package ruru.client.backend.rpcWrapper;

import com.google.gwt.user.client.rpc.IsSerializable;

public class BankItemWrapper implements IsSerializable {
	private String name;
	private String type;
	private boolean ambiguous;
	private int quantity;
	private int ID; // used if the name is ambiguous (Insignia of the Horde)

	public BankItemWrapper() {

	}

	/**
	 * Default constructor for unambiguous items.
	 * (Integer.MIN_VALUE)
	 * 
	 * @param type
	 * @param name
	 * @param quantity
	 */
	public BankItemWrapper(String type, String name, int quantity) {
		this.type = type;
		this.name = name;
		this.quantity = quantity;

		ambiguous = false;
		ID = 0;
	}

	public BankItemWrapper(String type, String name, int quantity, int ID) {
		this.type = type;
		this.name = name;
		this.quantity = quantity;

		ambiguous = true;
		this.ID = ID;
	}

	public String getName() {
		return name;
	}

	public String getType() {
		return type;
	}

	public int getQuantity() {
		return quantity;
	}

	public int getID() {
		return ID;
	}

	public boolean getAmbiguous() {
		return ambiguous;
	}

	public String toString() {
		return name + " " + type + " " + quantity;
	}
}